package net.st.controller.data;

import net.st.meta.SearchDataMeta;
import net.st.model.SearchData;
import net.st.service.SearchDataService;

import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;
import org.slim3.util.BeanUtil;

public class EditController extends Controller {

	private SearchDataService service = new SearchDataService();

	private SearchDataMeta meta = SearchDataMeta.get();

	@Override
	public Navigation run() throws Exception {
		SearchData SearchData = service.get(asKey(meta.key));
		BeanUtil.copy(SearchData, request);
		return forward("/data/edit.jsp");
	}
}